<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateFlowDosTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('flow_dos', function(Blueprint $table)
		{
			$table->increments('id');
			$table->integer('type')->nullable()->comment('任务类型');
			$table->string('name')->nullable()->comment('名称');
			$table->integer('ranks')->unsigned()->nullable()->comment('层级');
			$table->integer('sId')->nullable()->comment('产品id');
			$table->string('sName')->comment('商品');
			$table->integer('doId')->nullable()->comment('产品id');
			$table->string('doName')->comment('商品');
			$table->date('sDate')->nullable()->comment('开始时间');
			$table->date('eDate')->nullable()->comment('到期时间');
			$table->integer('goodsId')->nullable()->comment('产品id');
			$table->string('goodsType')->nullable()->comment('商品规格');
			$table->string('goodsName')->nullable()->comment('商品规格');
			$table->float('count')->unsigned()->nullable()->comment('数量');
			$table->string('unit')->nullable()->comment('计算单位');
			$table->float('price')->unsigned()->nullable()->comment('单价');
			$table->float('cost')->unsigned()->nullable()->comment('预计花费');
			$table->float('realCost')->unsigned()->nullable()->comment('花费');
			$table->integer('storageId')->nullable()->comment('库房Id');
			$table->string('storage')->nullable()->comment('库房');
			$table->integer('flowId')->nullable()->comment('流程id');
			$table->string('flowName')->nullable()->comment('流程名称');
			$table->integer('resultId')->nullable()->comment('步骤id');
			$table->string('result')->nullable()->comment('步骤结果');
			$table->string('info')->nullable()->comment('备注');
			$table->integer('start')->nullable()->comment('步骤id');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('flow_dos');
	}

}
